package com.colabo.j2ee.web.core.vo;

import java.io.Serializable;
import java.util.Date;

/**
 * 基础vo类
 */
public abstract class RecordObject implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final String DEL_FLAG_NORMAL = "n";
	public static final String DEL_FLAG_DELETED = "y";
	private String logicalKey;
	private Date createdTimestamp;
	private String creatorId;
	private Date lastModifiedTimestamp;
	private String lastModifierId;
	private String delFlag;

	public RecordObject() {
	}

	public String getLogicalKey() {
		return this.logicalKey;
	}
	
	public void setLogicalKey(String lKey) {
		this.logicalKey = lKey;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
	
	

	public Date getCreatedTimestamp() {
		return createdTimestamp;
	}

	public void setCreatedTimestamp(Date createdTimestamp) {
		this.createdTimestamp = createdTimestamp;
	}

	public String getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}

	public Date getLastModifiedTimestamp() {
		return lastModifiedTimestamp;
	}

	public void setLastModifiedTimestamp(Date lastModifiedTimestamp) {
		this.lastModifiedTimestamp = lastModifiedTimestamp;
	}

	public String getLastModifierId() {
		return lastModifierId;
	}

	public void setLastModifierId(String lastModifierId) {
		this.lastModifierId = lastModifierId;
	}

	/**
	 * 重新equals方法
	 */
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null || !(obj instanceof RecordObject)) {
			return false;
		}
		RecordObject concretevalueobject = (RecordObject) obj;
		String objectid = getLogicalKey();
		String objectid1 = concretevalueobject.getLogicalKey();
		if (objectid != null) {
			return objectid.equals(objectid1);
		}
		if (objectid1 != null) {
			return false;
		} else {
			return super.equals(obj);
		}
	}
}
